﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;

namespace Smarly.Web.App_Start
{
	public class BundleConfig
	{
		// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
		public static void RegisterBundles(BundleCollection bundles)
		{
			bundles.UseCdn = false;

			#region StyleSheet

			bundles.Add(new StyleBundle("~/bundles/css/smarly").Include(
				"~/css/style.css"));

			bundles.Add(new StyleBundle("~/bundles/css/smarly-main").Include(
				"~/css/style-main.css"));

			bundles.Add(new StyleBundle("~/bundles/css/smarly-page").Include(
				"~/css/style-page.css"));

			bundles.Add(new StyleBundle("~/bundles/css/smarly-forum").Include(
				"~/css/style-forum.css"));

			bundles.Add(new StyleBundle("~/bundles/css/smarly-profile-login").Include(
				"~/css/style-profile-login.css"));

			bundles.Add(new StyleBundle("~/bundles/css/yandex-donate").Include(
				"~/css/yandex-donate.css"));

			bundles.Add(new StyleBundle("~/bundles/css/highlight").Include(
				"~/css/highlight/vs.css",
				"~/css/highlight/linenumber.css"));

			bundles.Add(new StyleBundle("~/bundles/css/partner").Include(
				"~/css/partner/style.css",
				"~/css/partner/02.css"));

			#region admin

			bundles.Add(new StyleBundle("~/bundles/css/smarly.admin").Include(
				"~/css/smarly.admin.css"));

			bundles.Add(new StyleBundle("~/bundles/css/markitup").Include(
				"~/jslibs/markitup/skins/markitup/style.css", //skin
				"~/jslibs/markitup/sets/bbcode/style.css", //toolbar skin
				"~/jslibs/markitup/addons/quicksave/style.css"));

			#endregion

			bundles.Add(new StyleBundle("~/bundles/css/markitup.forum").Include(
				"~/jslibs/markitup/skins/markitup/style.css",
				"~/jslibs/markitup/sets/bbcode/style.forum.css"));

			#endregion

			#region JavaScript

			bundles.Add(new ScriptBundle("~/bundles/js/smarly").Include(
				"~/jslibs/smarly/smarly.message.js",
				"~/jslibs/smarly/smarly.modal.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/smarly/validate").Include(
				"~/jslibs/jquery.validate/jquery.validate.js",
				"~/jslibs/smarly/smarly.validation.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/smarly.main").Include(
				"~/jslibs/smarly/smarly.main.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/smarly.adsense").Include(
				"~/jslibs/smarly/smarly.adsense.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/smarly.content").Include(
				"~/jslibs/smarly/smarly.content.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/smarly.content.view").Include(
				"~/jslibs/smarly/smarly.content.view.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/highlight").Include(
				"~/jslibs/highlight/highlight.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/jquery.cookie").Include(
				"~/jslibs/jquery.cookie/jquery.cookie.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/jquery.nicescroll", "http://storage.smarly.net/smarlyjs/jquery.nicescroll_3.1.9.min.js").Include(
				"~/jslibs/jquery.nicescroll/jquery.nicescroll_3.1.9.js"));


			#region admin

			bundles.Add(new ScriptBundle("~/bundles/js/admin/smarly.main").Include(
				"~/jslibs/smarly/admin/smarly.main.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/admin/smarly.page").Include(
				"~/jslibs/smarly/admin/smarly.page.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/admin/smarly.page.content").Include(
				"~/jslibs/smarly/admin/smarly.page.content.js"));

			bundles.Add(new ScriptBundle("~/bundles/js/markitup").Include(
				"~/jslibs/rangy/rangy-input.js",
				"~/jslibs/markitup/jquery.markitup.js",
				"~/jslibs/markitup/sets/bbcode/set.js",
				"~/jslibs/markitup/addons/quicksave/set.js"));

			#endregion

			bundles.Add(new ScriptBundle("~/bundles/js/markitup.forum").Include(
				"~/jslibs/rangy/rangy-input.js",
				"~/jslibs/markitup/jquery.markitup.js",
				"~/jslibs/markitup/sets/bbcode/set.forum.js"));

			#endregion
		}
	}
}